package com.example.sss.controller;

import com.example.sss.pojo.Resume;
import com.example.sss.service.ResumeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

@Controller
@RequestMapping("demo")
public class ResultController {

    @Autowired
    private ResumeService resumeService;

    @RequestMapping("result")
    public ModelAndView result() {
        ModelAndView modelAndView = new ModelAndView("result");
        List<Resume> resumes = resumeService.findAllResume();
        modelAndView.addObject("resumes", resumes);
        return modelAndView;
    }
}
